package cn.sirun.com.fca.account.model.login;

import com.google.gson.annotations.SerializedName;

import cn.sirun.com.fca.account.model.base.Captcha;

/**
 * @author vinsonhuang
 * @date 2018/8/25
 */
public class ChallengeRequest {

    @SerializedName("username")
    private String userName;

    private String nation;

    private String phone;

    private String email;

    /**
     * 验证码信息
     */
    protected Captcha captcha;

    public ChallengeRequest() {
    }

    public ChallengeRequest(String email){
        this.email = email;
    }

    public ChallengeRequest(String nation, String phone) {
        this.nation = nation;
        this.phone = phone;
    }

    public ChallengeRequest(String userName, String nation, String phone, String email) {
        this.userName = userName;
        this.nation = nation;
        this.phone = phone;
        this.email = email;
    }

    public ChallengeRequest(String nation, String phone, Captcha captcha) {
        this.phone = phone;
        this.nation = nation;
        this.captcha = captcha;
    }

    public ChallengeRequest(String email, Captcha captcha) {
        this.email = email;
        this.captcha = captcha;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getNation() {
        return nation;
    }

    public void setNation(String nation) {
        this.nation = nation;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Captcha getCaptcha() {
        return captcha;
    }

    public void setCaptcha(Captcha captcha) {
        this.captcha = captcha;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("ChallengeRequest{");
        sb.append("userName='").append(userName).append('\'');
        sb.append(", nation='").append(nation).append('\'');
        sb.append(", phone='").append(phone).append('\'');
        sb.append(", email='").append(email).append('\'');
        sb.append(", captcha=").append(captcha);
        sb.append('}');
        return sb.toString();
    }
}
